<?php


namespace frontend\controllers;

use common\models\Country;
use frontend\models\EntryForm;
use yii\web\Controller;
use Yii;

class EntryFormController extends Controller
{

    public function actionLoad()
    {
        $model = new EntryForm();

        if($model->load(Yii::$app->request->post()) && $model->validate()) {
            //验证model接收到的数据

            //做些有意义的事


            return $this->render('entry-confirm', ['model'=>$model]);
        } else {
            //dd($model);
            //无论是初始化显示还是数据验证错误
            return $this->render('entry', ['model'=>$model]);
        }
    }









}